<script>
import KtTable from "/src/components/node-kantboot/components/KtTable/KtTable.vue";
// import columns from "./config/columns.config.js"
import i18nEditDialog from "/src/views/manage/common/carouselImage/components/I18nEditDialog.vue";

let columns=[
  {
    label: "ID",
    field: "id",
    type: "number",
    isSort: true,
    orderBy: "desc",
    isId: true,
    isSearch: false,
    isEdit: false,
    isHide: true,
    searchSetting: {
    }
  },
  {
    label: "优先级",
    field: "priority",
    type: "number",
    width: "240px",
    isSort: true,
    orderBy: "desc",
    isId: false,
    isSearch: true,
    isEdit: true,
    isAdd: true,
    setting: {
      // 后缀
      suffix: '越大越靠前',
    }
  },
  {
    label: "图片",
    field: "fileIdOfImage",
    type: "img",
    width: "270px",
    height: "100px",
    isEdit: true,
    isSearch: false,
    isAdd: true,
    setting: {
      type: "id",
      groupCode: "carouselImage",
      width: "220px",
      height: "100px",
    }
  },
  // {
  //     label: "名称",
  //     field: "name",
  //     type: "text",
  //     width: "200px",
  //     isEdit: true,
  //     isSearch: true,
  //     isAdd: true,
  // },
  // {
  //     label: "描述",
  //     field: "description",
  //     type: "text",
  //     width: "300px",
  //     isEdit: true,
  //     isSearch: true,
  //     isAdd: true,
  // },
  // 创建时间
  {
    label: "创建时间",
    field: "gmtCreate",
    type: "datetime",
    width: "200px",
    isEdit: false,
    isSearch: false,
    isAdd: false,
  },
  // 修改时间
  {
    label: "修改时间",
    field: "gmtModified",
    type: "datetime",
    width: "200px",
    isEdit: false,
    isSearch: false,
    isAdd: false,
  },

]

export default {
  components: {KtTable,i18nEditDialog},
  data() {
    return {
      columns
    }
  },
  mounted() {
  },
  methods: {
    toI18nEdit(row) {
      this.$refs.i18nEditDialog.open(row);
    }
  }
}
</script>

<template>
  <kt-table
      :columns="columns"
      requestUri="/business-common-web/admin/carouselImage"
      ref="ktTable">
    <template #operationAppend="{row}">
      <el-button type="primary" @click="toI18nEdit(row)">国际化管理</el-button>
    </template>
  </kt-table>

  <i18n-edit-dialog ref="i18nEditDialog"></i18n-edit-dialog>
</template>

<style scoped>

</style>